import random
import threading
import time
from flask import Flask, request, jsonify
from element_sci_api import (
    RDPConnector
)


def print_routes(app):
    with app.test_request_context():
        print("Available routes:")
        for rule in app.url_map.iter_rules():
            print(f"{rule.endpoint}: {rule.rule}")


app = Flask(__name__)
RDPConnector(app, "/rdp_client")

if __name__ == "__main__":
    print_routes(app)
    app.run(port=5000, host="0.0.0.0")
